package top.ivan.demo.hystrixclient.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class HystrixTestController {

    @Autowired
    private Environment env;

    @RequestMapping("hello")
    public String hello() {
        return "hello earth";
    }

    @RequestMapping("get")
    public String getConfig(String key) {
        return env.getProperty(key);
    }

/*    public Map<String,String> configMap() {
        Map map = new HashMap();
        map.put("")
    }*/
}
